package team.central;

import java.io.File;

import org.lwjgl.LWJGLUtil;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import team.central.states.levels.Lab;
import team.central.states.menus.Credits;
import team.central.states.menus.Instructions;
import team.central.states.menus.Saves;
import team.central.states.menus.Settings;

public class Game extends StateBasedGame {
	
	private static int WIDTH = 800;
	private static int HEIGHT = 600;
	
	public Game() {
		super("STEM Game 2014  |  pre-alpha  |  v0.01");
	}
	
	public static int getWidth() {
		return WIDTH;
	}
	
	public static int getHeight() {
		return HEIGHT;
	}
	
	public static void main(String[] args) throws SlickException {
		System.setProperty("org.lwjgl.librarypath", new File(new File(System.getProperty("user.dir"), "native"), LWJGLUtil.getPlatformName()).getAbsolutePath());
		System.setProperty("net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));
		AppGameContainer container = new AppGameContainer(new Game(), WIDTH, HEIGHT, false);
		container.setShowFPS(false);
		container.setVSync(true);
		container.setMaximumLogicUpdateInterval(15);
		container.setMinimumLogicUpdateInterval(15);
		container.setAlwaysRender(true);
		container.start();
		
	}
	@Override
	public void initStatesList(GameContainer container) throws SlickException {

//		this.addState(new MainMenu(1));
//		this.addState(new Saves(2));
//		this.addState(new Instructions(3));
//		this.addState(new Settings(4));
//		this.addState(new Credits(5));
		//this.addState(new MainMenu(1));
		//this.addState(new Saves(2));
		//this.addState(new Instructions(3));
		//this.addState(new Settings(4));
		//this.addState(new Credits(5));
		
		this.addState(new Lab(6));
		
	}
}
